<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
        <script>
            var weburl = '{yun:}$config.sy_weburl{/yun}';
        </script>
        <title>后台管理</title>
    </head>

    <body class="body_ifm">
        <form class="layui-form">
            <div id="subboxdiv" style="width:100%;height:100%;display:none;position:absolute;"></div>
            <div class="infoboxp">
                <div class="admin_new_tip">
                    <a href="javascript:;" class="admin_new_tip_close"></a>
                    <a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
                    <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
                    <div class="admin_new_tip_list_cont">
                        <div class="admin_new_tip_list">通过问答设置，可以实现“前台发布问答次数、问答审核开启”等设置。管理员根据自己运营需求自由设置。</div>
                    </div>
                </div>
                <div class="clear"></div>
				
				<div id="subboxdiv" style="width:100%;height:100%;display:none;position:absolute;"></div>
				
                <div class="main_tag mt10">
                    <div class="tag_box">
                        <div class="">
                        	<iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                        	<form class="layui-form" action="" method="post" enctype="multipart/form-data" target="supportiframe">
                            <table width="100%" class="table_form">
                                <tr class="admin_table_trbg">
                                    <th width="220" bgcolor="#f0f6fb"><span class="admin_bold">参数说明</span></th>
                                    <td bgcolor="#f0f6fb"><span class="admin_bold">参数值</span></td>
                                </tr>
                                <tr class="admin_table_trbg">
                                    <th width="220">前台问答发布次数：</th>
                                    <td>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <div class="layui-input-inline">
                                                    <input name="sy_day_ask_num" id="sy_day_ask_num" placeholder="请输入" autocomplete="off" class="layui-input" type="text" value="{yun:}$config.sy_day_ask_num{/yun}" size="30" maxlength="255" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" />
                                                </div>
                                                <span class="admin_web_tip">提示：0为不限</span>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                <tr class="admin_table_trbg">
                                    <th width="220">问答审核：</th>
                                    <td>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <div class="layui-input-inline">
                                                    <input type="checkbox" name="ask_check" lay-skin="switch" lay-text="开启|关闭" {yun:}if $config.ask_check=="1" {/yun} checked {yun:}/if{/yun} />
                                                </div>
                                                <div class="layui-form-mid layui-word-aux">
                                                	开启后，发布的问题默认未审核。关闭审核则发布的问题默认审核通过。
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th width="220">默认问答头像：</th>
                                    <td>
                                        <button type="button" class="yun_bth_pic adminupload" lay-data="{name: 'sy_friend_icon',imgid: 'imgfriend'}">上传图片</button>
                                        <input type="hidden" id="layupload_type" value="2" />
                                        <input type="hidden" id="upload_path" value="logo" />
                                        <input type="hidden" name="sy_friend_icon" value="{yun:}$config.sy_friend_icon{/yun}" />
                                        <img id="imgfriend" src="{yun:}$config.sy_weburl{/yun}/{yun:}$config.sy_friend_icon{/yun}" width="60" height="60" {yun:}if !$config.sy_friend_icon{/yun}class="none" {yun:}/if{/yun}>
                                    </td>
                                </tr>
                                <tr class="">
                                    <th>&nbsp;</th>
                                    <td align="left">
                                        <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
                                        <input class="layui-btn layui-btn-normal admin_buttonpz" id="config" type="button" name="config" value="提交">&nbsp;&nbsp;
                                        <input class="layui-btn layui-btn-normal admin_buttonpz" type="reset" value="重置" /></td>
                                </tr>
                            </table>
                            </form>
                        </div>

                    </div>
                </div>
                <script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
                <script>
                    layui.use(['layer', 'form'], function() {
                        var layer = layui.layer,
                            form = layui.form,
                            $ = layui.$;
                    });
                    $(function() {
                        $("#config").click(function() {
                            $.post("index.php?m=admin_question&c=config", {
                                config: $("#config").val(),
                                pytoken : $("#pytoken").val(),
                                sy_friend_icon: $("input[name=sy_friend_icon]").val(),
                                sy_day_ask_num: $("#sy_day_ask_num").val(),
                                ask_check : $("input[name=ask_check]").is(":checked") ? 1 : 0
                            }, function(data, textStatus) {
                                config_msg(data);
                            });
                        });
                    })

                     
                </script>
            </div>
        </form>
    </body>

</html>